Browser View State
State of BrowserView.
This state serves as a bridge between the browser instance and the BrowserView. It reflects the internal state of the browser in a way that is understandable by both the view and Compose. Asynchronous updates from the browser are converted to a Compose-observable state and vice versa. Additionally, it allocates and manages the internal resources necessary for the view to work.
A browser instance can only be associated with one state instance at a time. An attempt to create several states for a single browser leads to a runtime exception.
BrowserViewState.close should be called to release all allocated memory and resources when the state is no longer needed.
Please note, as for now, the state supports only OFF_SCREEN rendering mode. Passing a browser instance with HARDWARE_ACCELERATED mode leads to a runtime exception. See also: Rendering modes.
Since
8.0.0
Parameters
The browser, whose content is to be displayed.
The coroutine scope used for updating Compose observables.
The native AWT window in which the browser view is rendered.